Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgchgli0718 authored Jun 2, 2022
1 parent 06f928d commit b6ab4d3
Showing 1 changed file with 43 additions and 16 deletions.
59 changes: 43 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ This project can help you to make an auto-sync or auto-backup service from Mediu
- [X] [Support using Github Action as auto sync/backup service](https://github.com/ZhgChgLi/ZMediumToMarkdown/tree/main#using-github-action-as-your-free-auto-syncbackup-service)
- [X] Highly optimized markdown format for Medium

## Example
## Result
- [Original post on Medium](https://medium.com/pinkoi-engineering/%E5%AF%A6%E6%88%B0%E7%B4%80%E9%8C%84-4-%E5%80%8B%E5%A0%B4%E6%99%AF-7-%E5%80%8B-design-patterns-78507a8de6a5)
- [Downloaded & Converted Output Result](example/實戰紀錄-4-個場景-7-個-design-patterns-78507a8de6a5.md)
![Harry's Idea Draw](https://user-images.githubusercontent.com/33706588/171560402-40b23bec-a836-4468-9f07-68350ce82d4a.jpg)

## Setup

Expand All @@ -43,7 +44,35 @@ This project can help you to make an auto-sync or auto-backup service from Mediu
5. type `which ruby` in terminal to make sure current Ruby is **NOT** `/usr/bin/ruby`
6. type `gem install ZMediumToMarkdown` in terminal

### Manually
#### Usage
Command: `ZMediumToMarkdown`

**Downloading all posts from any user**
```
ZMediumToMarkdown -u [USEERNAME]
```

**Downloading single post**
```
ZMediumToMarkdown -p [MEDIUM POST URL]
```

**Update to latest version**
```
ZMediumToMarkdown -n
```

**Remove all downloaded posts data**
```
ZMediumToMarkdown -c
```

**Print current ZMediumToMarkdown Version & Output Path**
```
ZMediumToMarkdown -v
```

#### Manually
1. MacOS comes with a System Ruby pre-installed, but we are **NOT** Recommend to use that, using rvm/rbenv's Ruby instead.
2. install [rbenv](https://github.com/rbenv/rbenv) or [rvm](https://rvm.io/) to manage Ruby environment
3. install Ruby through rbenv/rym (you can install ruby version `2.6.X`)
Expand All @@ -55,34 +84,32 @@ This project can help you to make an auto-sync or auto-backup service from Mediu
9. type `bundle install` in terminal to install project dependencies
10. use `bundle exec ruby [USAGE Command]` in the furture (USAGE Command write down below)

## Usage
Execute File: `ZMediumToMarkdown`
#### Usage
Execute File: `bin/ZMediumToMarkdown`

### Downloading all posts from any user
**Downloading all posts from any user**
```
ZMediumToMarkdown -u [USEERNAME]
bundle exec ruby bin/ZMediumToMarkdown -u [USEERNAME]
```
![image](https://user-images.githubusercontent.com/33706588/170810772-ec7cd618-d208-4fca-9fe5-9ae6ee745951.png)

### Downloading single post
**Downloading single post**
```
ZMediumToMarkdown -p [MEDIUM POST URL]
bundle exec ruby bin/ZMediumToMarkdown -p [MEDIUM POST URL]
```
![image](https://user-images.githubusercontent.com/33706588/170810799-7da207ff-0642-4beb-9b3a-6af11d6e918d.png)

### Update to latest version
**Update to latest version**
```
ZMediumToMarkdown -n
bundle exec ruby bin/ZMediumToMarkdown -n
```

### Remove all downloaded posts data
**Remove all downloaded posts data**
```
ZMediumToMarkdown -c
bundle exec ruby bin/ZMediumToMarkdown -c
```

### Print current ZMediumToMarkdown Version & Output Path
**Print current ZMediumToMarkdown Version & Output Path**
```
ZMediumToMarkdown -v
bundle exec ruby bin/ZMediumToMarkdown -v
```

## Output
Expand Down

0 comments on commit b6ab4d3

Please sign in to comment.