pagecord-cli 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pagecord_cli/cli.rb +12 -9
- data/lib/pagecord_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 282d0f9f75b00c70f396dd00494c60b0e345d8af90689fa6cd6f217ea2288c12
|
|
4
|
+
data.tar.gz: db5c120d320ed5c012c4576e7fce832879336e3b3e255ce0b494ff0ddb489e73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b8f2174e7ca61cdba14e6b1accdd617da6c71c1b747c379120c6ff13955d1de26b0256ea34fecb2908e128a19eab52785abd0d2ae2d868916ac129f16d0523a
|
|
7
|
+
data.tar.gz: 872259af41ebbf97ece3a9eb859ebf4509f97568cd8027d8b5d6f813d40c5d96562ee7de51ead2e133922a64c26d2c3f0c7f7ba1896e765de969e9ee01d88f67
|
data/lib/pagecord_cli/cli.rb
CHANGED
|
@@ -34,6 +34,7 @@ module PagecordCLI
|
|
|
34
34
|
|
|
35
35
|
def run
|
|
36
36
|
return help if argv.empty? || %w[help -h --help].include?(argv.first)
|
|
37
|
+
return version if %w[version -v --version].include?(argv.first)
|
|
37
38
|
|
|
38
39
|
parser.order!(argv)
|
|
39
40
|
command = argv.shift
|
|
@@ -316,7 +317,7 @@ module PagecordCLI
|
|
|
316
317
|
opts.on("--published-at TIME") { |value| overrides[:published_at] = value }
|
|
317
318
|
opts.on("--tags TAGS") { |value| overrides[:tags] = value }
|
|
318
319
|
opts.on("--canonical-url URL") { |value| overrides[:canonical_url] = value }
|
|
319
|
-
opts.on("--hidden") { overrides[:hidden] =
|
|
320
|
+
opts.on("--[no-]hidden") { |value| overrides[:hidden] = value }
|
|
320
321
|
opts.on("--locale LOCALE") { |value| overrides[:locale] = value }
|
|
321
322
|
end.parse!(argv)
|
|
322
323
|
|
|
@@ -412,9 +413,16 @@ module PagecordCLI
|
|
|
412
413
|
end
|
|
413
414
|
end
|
|
414
415
|
|
|
416
|
+
def version
|
|
417
|
+
options[:json] = argv.include?("--json")
|
|
418
|
+
options[:json] ? print_json({ version: VERSION }) : output.puts("pagecord #{VERSION}")
|
|
419
|
+
0
|
|
420
|
+
end
|
|
421
|
+
|
|
415
422
|
def help
|
|
416
423
|
output.puts <<~HELP
|
|
417
424
|
Usage:
|
|
425
|
+
pagecord version
|
|
418
426
|
pagecord login SUBDOMAIN
|
|
419
427
|
pagecord logout [SUBDOMAIN]
|
|
420
428
|
pagecord blog list
|
|
@@ -437,21 +445,16 @@ module PagecordCLI
|
|
|
437
445
|
--json machine-readable output
|
|
438
446
|
--quiet suppress confirmation messages
|
|
439
447
|
|
|
440
|
-
|
|
448
|
+
Post options (publish, draft, post and page):
|
|
441
449
|
--title TITLE
|
|
442
450
|
--slug SLUG
|
|
443
451
|
--published-at TIME
|
|
444
452
|
--tags TAGS
|
|
445
453
|
--canonical-url URL
|
|
446
|
-
--hidden
|
|
447
454
|
--locale LOCALE
|
|
448
|
-
|
|
449
|
-
Post and page options:
|
|
450
|
-
--title TITLE
|
|
451
|
-
--content-file PATH (HTML, or Markdown if it ends .md)
|
|
452
|
-
--status draft|published
|
|
453
|
-
--slug, --published-at, --tags, --canonical-url, --locale
|
|
454
455
|
--hidden, --no-hidden
|
|
456
|
+
--content-file PATH post/page create and update; Markdown if it ends .md
|
|
457
|
+
--status draft|published post/page create and update
|
|
455
458
|
|
|
456
459
|
Appearance options:
|
|
457
460
|
--theme, --font, --width, --layout
|
data/lib/pagecord_cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pagecord-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Olly Headey
|
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
requirements: []
|
|
49
|
-
rubygems_version: 4.0.
|
|
49
|
+
rubygems_version: 4.0.20
|
|
50
50
|
specification_version: 4
|
|
51
51
|
summary: Publish local files to Pagecord
|
|
52
52
|
test_files: []
|