Skip to content

Commit d333f33

Browse files
committed
README improvements
1 parent c706b2f commit d333f33

File tree

1 file changed

+36
-45
lines changed

1 file changed

+36
-45
lines changed

README.md

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
A command-line tool for working with Strava activities.
44

55
* Bulk upload activities, including manual activities, from a `.csv` file.
6-
* Bulk edit existing your activities by downloading a `.csv` file and editing
7-
it in an editor or spreadsheet application, then uploading the changes.
6+
* Bulk edit existing activities by downloading a `.csv` file and editing it in
7+
an editor or spreadsheet application, then uploading the changes.
88

99
## Instructions
1010

@@ -57,105 +57,96 @@ with other `stravacli` commands.
5757

5858
You may have to repeat this step periodically if your access token expires.
5959

60+
### CSV Files
61+
62+
Most `stravacli` use [CSV](https://en.wikipedia.org/wiki/Comma-separated_values)
63+
data. There are lots of ways to edit CSV data, including:
64+
65+
* Using an editor like `vi` or `emacs`.
66+
* In a spreadsheet application like `Google Sheets` or `Microsoft Excel`.
67+
68+
Use Google to find out more. If you're using `Google Sheets` (it's free!),
69+
[here](https://support.google.com/docs/answer/40608) is help on how to import a
70+
`.csv` into Google Sheets. To export back to `.csv`, choose `File -> Download ->
71+
Comma-separated values`.
72+
6073
### Update Existing Activities
6174

6275
To bulk update existing Strava activities, first download them:
6376

6477
```bash
65-
stravacli download --access_token <YOUR_ACCESS_TOKEN> --out orig.csv
78+
stravacli download --access_token=<YOUR_ACCESS_TOKEN> --out=orig.csv
6679
```
6780

68-
This will download your existing activities into a file called `orig.csv`, in
69-
`csv` format. See `stravacli download help` for more detailed help on available
70-
flags, and what the columns mean. You can now open or import the `csv` file in a
71-
spreadsheet application of your choice; see the bottom of the page for tips.
81+
This will download your existing activities into a [CSV file](#csv-files) file
82+
called `orig.csv`. See `stravacli download help` for more detailed help, and
83+
what the columns mean. You can now open or import the `csv` file in a
84+
spreadsheet application of your choice.
7285

7386
Edit away; all of the columns are editable except for `ID` and `Start`. Sadly,
7487
there are a lot of fields for activities that are not editable via the Strava
7588
API.
7689

77-
When you are done editing, export the data as a `.csv` file again; again, see
78-
the bottom of the page for tips. Make sure not to clobber the original `.csv`;
79-
the instructions below assume you name the file `updated.csv`.
90+
When you are done editing, export the data as a `.csv` file again. Make sure not
91+
to clobber the original `.csv`; the instructions below assume you name the file
92+
`updated.csv`.
8093

8194
Finally, use `stravacli` to apply the changes. You can use `--dryrun` to see
8295
what changes would be made without actually making them.
8396

8497
```bash
85-
stravacli update --access_token <YOUR_ACCESS_TOKEN> --orig=orig.csv --updated updated.csv
98+
stravacli update --access_token=<YOUR_ACCESS_TOKEN> --orig=orig.csv --updated=updated.csv
8699
```
87100

88-
See `stravacli update help` for more detailed help on available flags.
101+
See `stravacli update help` for more detailed help.
89102

90103
### Upload Activities
91104

92105
See the next section for Manual Activities; this section is for activities with
93-
an associated `.gpx` or similar file. To bulk upload activities, first get the
94-
required header:
106+
an associated `.gpx`, `tcx`, or `.fit` file. To bulk upload activities, first
107+
get the required header:
95108

96109
```bash
97-
stravacli uploadheader
110+
stravacli uploadheader > activities.csv
98111
```
99112

100113
See `stravacli uploadheader help` for detailed descriptions of the data columns.
101114

102-
Copy/paste the header data into a spreadsheet application of your choice; see
103-
the bottom of the page for tips. Add rows for the activities you'd like to
104-
create.
105-
106-
When you're done, export the data as a `.csv` file; again, see the bottom of the
107-
page for tips. The instructions below assume you name the file `activities.md`.
115+
Add rows to the [CSV file](#csv-files) for the activities you'd like to create.
108116

109117
Finally, use `stravacli` to upload. You can use `--dryrun` to see what changes
110118
would be made without actually making them.
111119

112120
```bash
113-
stravacli upload --access_token <YOUR_ACCESS_TOKEN> --in=activities.csv
121+
stravacli upload --access_token=<YOUR_ACCESS_TOKEN> --in=activities.csv
114122
```
115123

116-
See `stravacli upload help` for more detailed help on available flags.
124+
See `stravacli upload help` for more detailed help.
117125

118126
### Upload Manual Activities
119127

120128
To bulk upload manual activities, first get the required header:
121129

122130
```bash
123-
stravacli uploadmanualheader
131+
stravacli uploadmanualheader > activities.csv
124132
```
125133

126134
See `stravacli uploadmanualheader help` for detailed descriptions of the data
127135
columns.
128136

129-
Copy/paste the header data into a spreadsheet application of your choice; see
130-
the bottom of the page for tips. Add rows for the activities you'd like to
131-
create. Note that `Duration` is in seconds, and `Distance` is in meters!
132-
133-
When you're done, export the data as a `.csv` file; again, see the bottom of the
134-
page for tips. The instructions below assume you name the file `activities.md`.
137+
Add rows to the [CSV file](#csv-files) for the activities you'd like to create.
138+
Note that `Duration` is in seconds, and `Distance` is in meters!
135139

136140
Finally, use `stravacli` to upload. You can use `--dryrun` to see what changes
137141
would be made without actually making them.
138142

139143
```bash
140-
stravacli uploadmanual --access_token <YOUR_ACCESS_TOKEN> --in=activities.csv
144+
stravacli uploadmanual --access_token=<YOUR_ACCESS_TOKEN> --in=activities.csv
141145
```
142146

143-
See `stravacli uploadmanual help` for more detailed help on available flags.
147+
See `stravacli uploadmanual help` for more detailed help.
144148

145149
### Cleanup
146150

147151
If you are done using `stravacli`, you can revoke its API access
148152
[here](https://www.strava.com/settings/apps).
149-
150-
### Editing CSV Files
151-
152-
There are lots of ways to edit
153-
[CSV](https://en.wikipedia.org/wiki/Comma-separated_values) data, including:
154-
155-
* Using an editor like `vi` or `emacs`.
156-
* In a spreadsheet application like `Google Sheets` or `Microsoft Excel`.
157-
158-
Since `Google Sheets` is free...
159-
[Here](https://support.google.com/docs/answer/40608) is help on how to import a
160-
`.csv` into Google Sheets. To export back to `.csv`, choose `File -> Download ->
161-
Comma-separated values`.

0 commit comments

Comments
 (0)