Skip to content

Commit

Permalink
Merge pull request #54 from freedomofpress/docs-fix-readme
Browse files Browse the repository at this point in the history
Update description in README to mirror current implementation
  • Loading branch information
redshiftzero authored Mar 26, 2020
2 parents dfe96e9 + d15d24e commit bdaff89
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ For all device types (described in detail below), the following standard error t
- `ERROR_EXTRACTION`: Error while extracting the archive
- `ERROR_METADATA_PARSING`: The metadata.json file cannot be correctly parsed
- `ERROR_ARCHIVE_METADATA`: The metadata failed the check
- `ERROR_USB_CONFIGURATION`: There is no USB controller attached to the VM, the dom0 configuration (in `config.json`) or USB device identifier is is misconfigured
- `ERROR_USB_CONFIGURATION`: There is no USB controller attached to the VM
- `ERROR_GENERIC`: An uncaught (unexpected) error somewhere in the script. These should not happen unless the code improperly handles errors

The supported device types for export are as follows, including the possible errors specific to that device type:
Expand Down Expand Up @@ -134,22 +134,31 @@ The supported device types for export are as follows, including the possible err

### Export Folder Structure

When exporting to a USB drive (using the disk device in metadata.json), the files will be placed on the drive as follows: The root of the USB drive will contain one folder per source, reflecting their source codename in the client. Documents or messages exported will be copied to that directory, preserving the filename from the server. In case a same file is exported twice, a confirmation window replace/rename/abort.
When exporting to a USB drive, the files will be placed on the drive as follows: The root of the USB drive will contain one `sd-export-[timestamp]` folder, where `[timestamp]` is in the format `YYYYMMDD-hhmmss`. This folder will contain a subfolder `export_data`, which will contain the exported file with its original name as submitted by the source. For example:

```
.
└── sd-export-20200116-003153
└── export_data
└── secret_memo.pdf
```

To support multiple files, in the long term, we are planning to use a folder structure similar to the following, where the journalist designation for a source is used for folder names and message/reply file names.

Example folder structure of USB export drive:

```
.
β”œβ”€β”€ cytotoxic payer
β”œβ”€β”€ cytotoxic-payer
β”‚ β”œβ”€β”€ 1-cytotoxic-payer-msg
β”‚ β”‚ └── file-to-export-1.txt
β”‚ β”‚ └── 1-cytotoxic-payer-msg.txt
β”‚ β”œβ”€β”€ 2-cytotoxic-payer-msg
β”‚ β”‚ └── file-to-export-2.txt
β”‚ β”‚ └── 2-cytotoxic-payer-msg.txt
β”‚ └── 3-cytotoxic-payer-doc
β”‚ β”‚ └── file-to-export-3.doc
β”œβ”€β”€ grandiloquent pasteboard
β”‚ β”‚ └── interesting_file.doc
β”œβ”€β”€ grandiloquent-pasteboard
β”‚ └── 1-grandiloquent-pasteboard-doc
β”‚ β”‚ └── file-to-export-1.doc
└── snug seek
β”‚ β”‚ └── questionable_file.pdf
└── snug-seek
```

0 comments on commit bdaff89

Please sign in to comment.