spamwax / alfred-pinboard-rs

Alfred Workflow for Pinboard (Rust)
Other
277 stars 13 forks source link

Cache update error #78

Closed mirimo closed 4 years ago

mirimo commented 4 years ago

Hi I'm trying to go through the first configuration without success. I am probably making a simple mistake..? Pinoboard API token is valid (to be sure I generated a new one) and I have only one bookmark on my pinboard account. MacOS 10.15.5 + Alfred 4.0.9_1144

[12:34:41.760] Logging Started... [12:34:49.998] Rusty Pin[Keyword] Processing complete [12:34:49.998] Rusty Pin[Keyword] Passing output 'm:4' to Run Script [12:34:50.013] STDERR: Rusty Pin[Run Script] [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Parsing input arguments. [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Deciding on which command branch [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::commands::config] Starting in run [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in setup [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_workflow_dirs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] cache_dir: /Users/jonasz/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] data_dir: /Users/jonasz/Library/Application Support/Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in read [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_alfred_version [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in save [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::commands::config] Saved new configs to settings.json in: /Users/jonasz/Library/Application Support/Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs [12:34:50.015] Rusty Pin[Run Script] Processing complete [12:34:50.016] Rusty Pin[Run Script] Passing output 'Successfully set user credentials. ' to Conditional [12:34:50.016] Rusty Pin[Conditional] Processing complete [12:34:50.017] Rusty Pin[Conditional] Passing output 'Successfully set user credentials. ' to Run Script [12:34:50.872] STDERR: Rusty Pin[Run Script] [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Parsing input arguments. [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Deciding on which command branch [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Starting in setup [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in setup [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_workflow_dirs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] cache_dir: /Users/jonasz/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] data_dir: /Users/jonasz/Library/Application Support/Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in read [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_alfred_version [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard] pinb::new: calling CachedData::new [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] new: starting [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] cached_dir: "/Users/jonasz/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs" [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] create_cache_dir: starting [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] success create_cache_dir: "/Users/jonasz/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs" [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] load_cache_data_from_file: starting [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] cache_ok: starting [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard] pinb::new: cache file missing, calling update [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::cached_data] update_cache: starting [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] all_pins: starting. [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] get_api_response: starting. [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] url: "https://api.pinboard.in/v1/posts/all" [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] add_auth_token: starting. [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] resp is ok (no error) [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] string from resp ok [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] ['\u{feff}', '[', '{', '\"', 'h', 'r', 'e', 'f', '\"', ':'] [2020-06-16T10:34:50Z DEBUG rusty_pin::pinboard::api] received all bookmarks [2020-06-16T10:34:50Z DEBUG alfred_pinboard_rs] Starting in show_error_alfred [12:34:50.881] Rusty Pin[Run Script] Processing complete [12:34:50.882] Rusty Pin[Run Script] Passing output '{"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"expected value at line 1 column 1","title":"Error"}]} ' to Junction [12:34:50.883] Rusty Pin[Junction] Processing complete [12:34:50.884] Rusty Pin[Junction] Passing output '{"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"expected value at line 1 column 1","title":"Error"}]} ' to Filter [12:34:50.884] Rusty Pin[Junction] Passing output '{"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"expected value at line 1 column 1","title":"Error"}]} ' to Filter [12:34:50.885] Rusty Pin[Filter] Processing complete [12:34:50.886] Rusty Pin[Filter] Passing output '{"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"expected value at line 1 column 1","title":"Error"}]} ' to Post Notification

ghost commented 4 years ago

I also have trouble

スクリーンショット 2020-06-17 3 35 04 スクリーンショット 2020-06-17 3 35 12
vmlrodrigues commented 4 years ago

I'm getting the same error when I do a 'pa' (set user token) and a "Invalid server response: expected value at line 1 column 1" when using 'p' (creating tags).

byalextran commented 4 years ago

i've also been getting this same error trying to add a new bookmark or update the cache. my current setup has been working fine until now. don't think i've changed anything about my setup that could've caused this.

here's the debug log after running pu.

[11:16:17.473] Logging Started...
[11:16:21.763] Rusty Pin[Keyword] Processing complete
[11:16:21.772] Rusty Pin[Keyword] Passing output '' to Junction
[11:16:21.773] Rusty Pin[Junction] Processing complete
[11:16:21.773] Rusty Pin[Junction] Passing output '' to Run Script
[11:16:23.620] STDERR: Rusty Pin[Run Script] [2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs] Parsing input arguments.
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs] Deciding on which command branch
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs] Starting in setup
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] Starting in setup
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_workflow_dirs
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] cache_dir: /Volumes/Home/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] data_dir: /Volumes/Home/Library/Application Support/Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] Starting in read
[2020-06-17T16:16:21Z DEBUG alfred_pinboard_rs::workflow_config] Starting in get_alfred_version
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] pinb::new: calling CachedData::new
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] new: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data]   cached_dir: "/Volumes/Home/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs"
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] create_cache_dir: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data]   success create_cache_dir: "/Volumes/Home/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs"
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] load_cache_data_from_file: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] read_cached_pins: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] read_cached_tags: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::cached_data] cache_ok: starting
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] pinb::new: cache not missing
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] enable_fuzzy_search: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] enable_tag_only_search: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] enable_private_new_pin: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] enable_toread_new_pin: starting.
[2020-06-17T16:16:21Z DEBUG alfred_rs::data] loading from: /Volumes/Home/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs/user.workflow.1F3CD475-7FAC-4543-A775-47DE3105B2B1-Rusty_Pin-updater.json
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater] entering init
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater] last check: 2020-06-17 16:14:48.105275 UTC
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater]   calling read_last_check_status
[2020-06-17T16:16:21Z DEBUG alfred_rs::data] loading from: /Volumes/Home/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs/last_check_status_async.json
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater]   read last_check_status: UpdateInfo { version: Version { major: 0, minor: 15, patch: 12, pre: [], build: [] }, fetched_at: Some(2020-06-17T16:14:48.105275Z), downloadable_url: "https://github.com/spamwax/alfred-pinboard-rs/releases/download/0.15.12/alfred-pinboard-rust-0.15.12.alfredworkflow", _priv: () }
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater]   status: Ok(None)
[2020-06-17T16:16:21Z DEBUG alfred_rs::updater] successfully set the state of release worker
[2020-06-17T16:16:21Z INFO  alfred_pinboard_rs::commands::update] Starting in update_cache
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard] is_cache_outdated: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::api] recent_update: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::api] get_api_response: starting.
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::api]   url: "https://api.pinboard.in/v1/posts/update"
[2020-06-17T16:16:21Z DEBUG rusty_pin::pinboard::api] add_auth_token: starting.
[2020-06-17T16:16:23Z DEBUG rusty_pin::pinboard::api]  resp is ok (no error)
[2020-06-17T16:16:23Z DEBUG rusty_pin::pinboard::api]  string from resp ok
[2020-06-17T16:16:23Z DEBUG rusty_pin::pinboard::api]    ['\u{feff}', '{', '\"', 'u', 'p', 'd', 'a', 't', 'e', '_']
[11:16:23.644] Rusty Pin[Run Script] Processing complete
[11:16:23.645] Rusty Pin[Run Script] Passing output 'Error: serde error: expected value at line 1 column 1
' to Junction
[11:16:23.646] Rusty Pin[Junction] Processing complete
[11:16:23.647] Rusty Pin[Junction] Passing output 'Error: serde error: expected value at line 1 column 1
' to Filter
[11:16:23.648] Rusty Pin[Filter] Processing complete
[11:16:23.648] Rusty Pin[Filter] Passing output 'Error: serde error: expected value at line 1 column 1
' to Large Type
[11:16:23.649] Rusty Pin[Junction] Passing output 'Error: serde error: expected value at line 1 column 1
' to Filter
fneven-uh commented 4 years ago

I get the same error.

smellsworth commented 4 years ago

Samesies

matthauger commented 4 years ago

Same issue.

dabigc commented 4 years ago

Same. Noticed it earlier this week.

diasyrmus commented 4 years ago

Suspect it's this: https://twitter.com/nnnnicholas/status/1274067020011765765?s=20

If anyone else is having Pinboard API problems since June 14, I added this snippet inside the HTTP response handler and it fixed my program:

if (http://response.data.charCodeAt(0) === 0xFEFF) { http://response.data = JSON.parse(http://response.data.slice(1)); }

That's a temp fix while Pinboard chases down the bug:

Pinboard @Pinboard · 13h It looks like a byte order mark is getting added. Try stripping whitespace around the JSON response before parsing. Meanwhile I'm trying to chase down the bug (this happened after a major server upgrade)

https://twitter.com/Pinboard/status/1274055573902774272?s=20

drod3763 commented 4 years ago

Same issue

kahl-dev commented 4 years ago

I also have the same issue

diasyrmus commented 4 years ago

Maciej/Pinboard reporting that he’s solved the underlying issue for this i think?

pyrho commented 4 years ago

The BOM issue has indeed been solved (and I tested it too), see this tweet. But I still have an issue caused by something else:

[2020-07-02T11:10:36Z DEBUG rusty_pin::pinboard::api] tags_frequency: starting.
[2020-07-02T11:10:36Z DEBUG rusty_pin::pinboard::api] get_api_response: starting.
[2020-07-02T11:10:36Z DEBUG rusty_pin::pinboard::api]   url: "https://api.pinboard.in/v1/tags/get"
[2020-07-02T11:10:36Z DEBUG rusty_pin::pinboard::api] add_auth_token: starting.
[2020-07-02T11:10:37Z DEBUG rusty_pin::pinboard::api]  resp is ok (no error)
[2020-07-02T11:10:37Z DEBUG rusty_pin::pinboard::api]  string from resp ok
[2020-07-02T11:10:37Z DEBUG rusty_pin::pinboard::api]    ['{', '\"', '0', 'm', 'q', '\"', ':', '1', ',', '\"']
[2020-07-02T11:10:37Z DEBUG rusty_pin::pinboard::api]   trying to decode non-object empty tag list
[2020-07-02T11:10:37Z DEBUG alfred_pinboard_rs] Starting in show_error_alfred
[13:10:37.439] Rusty Pin[Script Filter] {"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"invalid type: map, expected a sequence at line 1 column 0","title":"Error"}]}

I queried this endpoint manually and the output seems fine so I'm not sure what's going on. I ran: λ> http 'https://api.pinboard.in/v1/tags/get?auth_token=pyrho:DONTPUTYOURAPITOKENHERE&format=json' | jq .

Output (click to expand) ``` { "0mq": 1, "1g": 1, "386": 1, "3d": 7, "3dp": 2, "3dprint": 8, "3dprinting": 2, "8": 1, "808": 1, "a*": 1, "a2p": 1, "abbrev": 1, "ableton": 3, "abs": 4, "accent": 1, "acl": 1, "acronym": 1, "activitypub": 1, "ad": 1, "adblocking": 1, "add-ons": 1, "address": 1, "adium": 1, "admin": 1, "adobe": 1, "adress": 1, "adresse": 1, "advantage": 5, "advent": 1, "aero": 1, "aes": 2, "aggregator": 3, "agrandissement": 1, "agrippa": 1, "ai": 2, "airplay": 1, "ajax": 4, "albumart": 1, "algorithm": 27, "algorithms": 4, "alignment": 1, "alt-tab": 1, "alternantive": 1, "altivec": 1, "alttab": 1, "amavis": 1, "ambient": 2, "amende": 1, "amp": 3, "amplifier": 1, "amqp": 3, "anagram": 1, "analysis": 2, "analytics": 1, "android": 2, "angular": 2, "angular.js": 2, "angularjs": 4, "animated": 2, "animation": 2, "anonymous": 1, "answers": 1, "antenna": 1, "anti": 1, "anycubic": 1, "apache": 5, "api": 12, "apns": 5, "app": 3, "apple": 5, "approle": 1, "architecture": 4, "archive": 1, "archlinux": 5, "arduino": 3, "argentique": 3, "Art": 10, "article": 2, "ASCII": 6, "asio": 1, "asm": 1, "astres": 1, "astronomie": 1, "astronomy": 1, "async": 2, "asynchronous": 1, "atmega": 1, "atmel": 1, "audio": 12, "audiophile": 1, "auth": 1, "authentication": 1, "autofs": 2, "automation": 6, "auto_ptr": 1, "aux": 1, "avatar": 1, "avr": 2, "avrdude": 1, "awesome": 9, "awk": 2, "aws": 2, "backend": 1, "background": 3, "backup": 6, "bal": 1, "base64": 1, "based": 1, "bash": 1, "bayes": 3, "bazaar": 2, "bdd": 2, "beamer": 1, "beautifulsoup": 1, "bed": 1, "benchmark": 3, "best": 2, "bestpractice": 2, "bho": 7, "bibtex": 1, "bike": 1, "bin": 1, "binary": 2, "bios": 2, "biquad": 1, "bitcoin": 6, "bitwise": 1, "bke": 1, "black": 1, "blackberry": 1, "blanc": 1, "blind": 1, "blockhash": 1, "blocking": 1, "blog": 20, "bloom": 1, "bluemix": 1, "blueprint": 4, "blur": 1, "boilerplate": 3, "boite": 1, "book": 15, "booking": 1, "booklet": 1, "bookmark": 3, "bookmarks": 1, "books": 2, "boost": 3, "bootstrap": 3, "bot": 5, "boyer": 1, "bpm": 1, "branch": 3, "brand": 1, "browser": 11, "browserify": 1, "brushes": 1, "btt": 1, "buider": 1, "build": 4, "bujo": 1, "bullet": 1, "bundler": 1, "bundle_dm": 2, "bundle_pfe": 8, "bus": 1, "button": 1, "buy": 1, "c": 18, "c++": 50, "c4.5": 1, "c64": 2, "cable": 1, "cache": 1, "cad": 10, "calculator": 1, "calendar": 1, "calm": 1, "camion": 1, "captcha": 1, "capture": 1, "card": 2, "career": 1, "carmack": 1, "carte": 1, "cbor": 1, "celery": 1, "cert": 1, "certificate": 1, "cgi": 2, "chai": 1, "character": 1, "chart": 5, "charts": 2, "cheatsheet": 8, "cherry": 1, "chiffrement": 1, "chiptune": 4, "choc": 2, "chrome": 2, "ci": 1, "ciel": 2, "cinema": 2, "cinemagraph": 1, "cinemagraphs": 1, "circuit": 1, "clang": 1, "class": 1, "classification": 4, "classifier": 1, "cli": 8, "client": 2, "climate": 1, "clip": 1, "clo": 1, "clojure": 13, "cloud": 1, "club": 1, "cmake": 2, "cmoy": 2, "code": 20, "coding": 4, "coiled": 1, "coldwave": 1, "colemak": 2, "collaborative": 1, "collection": 1, "color": 11, "colorscheme": 1, "colortheme": 1, "command": 1, "commandline": 4, "commit": 1, "community": 4, "compare": 1, "comparison": 3, "compatibility": 1, "competition": 1, "compile": 1, "compiler": 6, "completion": 1, "complexity": 2, "compressedsensing": 1, "compression": 3, "computer": 5, "computing": 2, "conference": 1, "config": 2, "conky": 2, "conspiracy": 1, "container": 2, "content": 1, "continuous": 1, "converter": 4, "conway": 2, "cookbook": 1, "copy": 1, "corne": 1, "cote": 1, "cover": 1, "coverLetter": 3, "cp": 1, "cpan": 1, "cpu": 1, "crack": 5, "crawling": 1, "creditcard": 3, "cron": 1, "crontab": 1, "cryptocurrency": 1, "cryptography": 5, "cryptokey": 3, "css": 15, "CSS3": 2, "ctags": 1, "ctap": 1, "culture": 8, "culturePub": 1, "currencies": 1, "currency": 3, "curve": 1, "customise": 1, "customization": 5, "CV": 2, "cwd": 1, "cygwin": 1, "cypress": 1, "cyril": 1, "d!hr": 1, "d3": 3, "d3js": 2, "daemons": 1, "dashboard": 1, "dashlane": 2, "data": 11, "database": 8, "datamining": 2, "dataset": 1, "date": 2, "Déménagement": 1, "db": 1, "dcs": 1, "ddl": 1, "ddos": 1, "dea": 1, "dead": 1, "deadKey": 2, "debian": 3, "debug": 1, "debugger": 1, "debugging": 1, "decentralized": 1, "decode": 1, "decoder": 3, "del.icio.us": 1, "delicious": 3, "demo": 1, "deno": 1, "dependency": 1, "deployment": 2, "depressing": 1, "design": 23, "designer": 1, "destructor": 1, "detection": 2, "dev": 2, "development": 24, "developpement": 2, "devops": 3, "dfu": 1, "diagram": 4, "dictionary": 1, "diff": 5, "digitalocean": 4, "directory": 3, "discovery": 1, "dish": 1, "disposable": 3, "distribution": 1, "divinity": 1, "diy": 28, "django": 8, "dll": 1, "DNS": 6, "do": 2, "doc": 2, "docker": 3, "dockerfile": 1, "documentation": 8, "docx": 1, "dog": 2, "dom": 3, "domain": 3, "domains": 1, "dos:ee": 1, "dot": 1, "dotfiles": 1, "dotty": 1, "dovecot": 2, "download": 6, "drawing": 1, "dream": 1, "dreaming": 1, "driver": 1, "dropbox": 1, "dubstep": 2, "duct": 1, "dump": 1, "dvcs": 5, "dvorak": 1, "dyi": 1, "e2e": 1, "e2ee": 1, "ea": 1, "eclipse": 1, "eco": 1, "ecology": 1, "edbanger": 1, "edge": 1, "editor": 9, "education": 3, "electro": 3, "electronics": 9, "elisp": 1, "elixir": 3, "elon": 1, "emacs": 2, "email": 7, "emploi": 6, "emscripten": 1, "emulation": 3, "emulator": 2, "encode": 1, "encoder": 1, "encoding": 2, "encrypted": 1, "encryption": 7, "endpoint": 1, "endtoend": 1, "engine": 2, "english": 1, "enigma": 1, "enigmes": 1, "enso": 1, "enum": 1, "ergo": 4, "ergonomic": 1, "error": 2, "errorformat": 1, "essay": 2, "ethereum": 2, "etoiles": 2, "event": 2, "eventloop": 1, "excel": 1, "exception": 1, "exceptions": 1, "expired": 1, "explanation": 1, "exploit": 2, "explorer": 1, "express": 1, "expressjs": 2, "extended": 1, "extension": 4, "extensions": 1, "external": 2, "eyecandy": 2, "fablab": 1, "facebook": 2, "factorio": 7, "fake": 2, "faq": 2, "fda": 1, "feed": 1, "filco": 1, "file": 2, "filemanager": 1, "filename": 1, "files": 1, "filesync": 1, "filesystem": 3, "film": 5, "filter": 3, "filtres": 1, "finance": 2, "firefox": 7, "firewall": 2, "firmware": 4, "fiscalite": 1, "fitt": 1, "fixed": 1, "fixie": 1, "flask": 1, "flexbox": 1, "float": 2, "flow": 3, "flowchart": 1, "focus": 1, "folders": 1, "font": 1, "fontawesome": 1, "fonts": 4, "food": 1, "footpedal": 1, "format": 1, "formatter": 1, "formula": 1, "forum": 5, "foss": 2, "fp": 6, "framework": 16, "free": 52, "freebox": 1, "freephonie": 1, "frenchKiss": 1, "frenchTouch": 1, "frontend": 1, "fruityLoop": 1, "fts": 1, "fugitive": 1, "fun": 5, "functional": 9, "funny": 14, "fuse": 3, "fusion": 1, "g++": 1, "gallery": 2, "game": 10, "gamedev": 3, "gamemaking": 1, "gameoflife": 1, "gameone": 1, "games": 10, "game_of_life": 1, "gaming": 1, "garbagecollection": 2, "garmin": 2, "gc": 1, "gcc": 4, "gdb": 1, "gear": 1, "geek": 6, "geekcode": 2, "generator": 16, "genetic": 1, "geo": 1, "geohash": 1, "geospatial": 1, "gergo": 1, "gibson": 1, "gif": 6, "ginsu": 1, "git": 13, "github": 8, "gitosis": 1, "glossaries": 1, "glossary": 2, "glow": 2, "gmail": 3, "go": 5, "google": 17, "googlemaps": 1, "googlewave": 1, "gorush": 1, "gpg": 1, "gps": 2, "gpx": 1, "graph": 7, "graphic": 2, "graphite": 1, "gravatar": 1, "greasemonkey": 1, "grems": 1, "grunt": 1, "GTD": 4, "gui": 2, "guide": 19, "hack": 10, "hacke": 1, "hacker": 2, "hackerkey": 2, "hackerspace": 1, "hacking": 5, "hacks": 1, "hakim": 1, "handlebars": 1, "handlebars.js": 1, "handwire": 4, "handwiring": 1, "hardware": 9, "hash": 1, "hashing": 3, "haskell": 4, "hdd": 1, "header": 3, "headless": 2, "headphone": 2, "heenok": 3, "hex": 2, "hg": 12, "hhkb": 2, "highlight": 1, "hilbert": 1, "hiphop": 3, "history": 3, "hoax": 1, "hobbs": 1, "hooking": 1, "hosting": 6, "hotel": 1, "hotspot": 1, "howto": 54, "html": 10, "html5": 3, "http": 5, "httpd": 1, "hugepage": 1, "hugo": 1, "hyperapp": 1, "hypertext": 1, "i3": 1, "ibm": 2, "ical": 1, "icon": 3, "icons": 5, "IDE": 6, "idea": 1, "identity": 1, "idf": 1, "ids": 1, "ie": 7, "ie10": 1, "ie6": 1, "iflash": 1, "illuminati": 1, "illustration": 12, "illustrator": 2, "image": 6, "imagemagick": 1, "imap": 2, "immutable": 1, "immutablejs": 1, "impot": 1, "impression": 1, "inbox": 1, "include": 3, "indent": 1, "indexing": 9, "information": 3, "infosec": 1, "infrastructure": 2, "ingress": 2, "injection": 1, "input": 1, "inspiration": 5, "intel": 2, "interactive": 2, "interface": 2, "internet": 9, "internet-explorer": 2, "interview": 1, "intrusion": 1, "ion3": 1, "ios": 4, "ip": 2, "ipfs": 1, "iphone": 7, "iphonegndgn": 1, "ipod": 6, "iptables": 2, "iptv": 1, "irc": 1, "isight": 1, "iso": 1, "isomorphicapp": 1, "isp": 1, "jabber": 1, "jack": 1, "jargon": 1, "java": 2, "javascript": 77, "javascrtip": 1, "jcrush": 1, "jetlag": 1, "jeu": 1, "journal": 1, "jq": 2, "jquery": 5, "js": 12, "jsdom": 1, "jshint": 1, "json": 7, "jsr": 1, "jsx": 1, "jumper": 1, "k8s": 4, "kailh": 2, "kdiff3": 1, "key": 3, "keybase": 1, "keyboad": 2, "keyboard": 30, "keyboarding": 1, "keycap": 4, "keycaps": 2, "khugepaged": 1, "kibble": 1, "kicad": 1, "kinesis": 7, "kitty": 1, "knn": 1, "knowledge": 1, "krytox": 1, "kubernetes": 11, "kubrick": 1, "label": 2, "labels": 1, "labo": 1, "lag": 2, "lambda": 1, "laser": 1, "lastfm": 1, "latency": 2, "later": 1, "latex": 17, "law": 1, "layout": 4, "learn": 2, "learning": 7, "legal": 2, "lenovo": 1, "lepen": 1, "letsencrypt": 2, "letter": 1, "letters": 1, "lettre": 1, "lettres": 1, "level": 1, "levelone": 1, "libraries": 4, "library": 30, "life": 2, "lifehack": 2, "light": 2, "lightweight": 1, "link": 1, "Linkedin": 2, "linkGrammar": 1, "lint": 1, "linux": 31, "lisp": 2, "list": 4, "lists": 1, "literal": 1, "literature": 1, "live": 7, "livecd": 3, "llvm": 1, "localhost": 3, "localization": 1, "location": 1, "lofo": 2, "log": 4, "log-processing": 1, "logger": 1, "logging": 3, "logo": 1, "logstash": 1, "lol": 3, "loop": 1, "lost": 3, "ls": 1, "LSA": 7, "lube": 2, "lubrication": 2, "lucid": 1, "lulz": 1, "lumiere": 1, "lumineuse": 1, "lvm": 1, "lz": 1, "lzma": 1, "mac": 7, "macbook": 2, "machine": 1, "machinelearning": 6, "macos": 7, "macosx": 1, "magasin": 1, "magicmethods": 1, "mail": 7, "mailingList": 1, "mailserver": 2, "make": 1, "maker": 1, "mame": 4, "man": 1, "manager": 2, "manipulation": 1, "map": 3, "maps": 2, "markdown": 2, "markup": 1, "marlin": 1, "marouf": 1, "mars": 1, "mastodon": 1, "matching": 2, "math": 3, "matlab": 2, "matrix": 2, "maverick": 6, "mdn": 1, "mean": 1, "mechanical": 4, "mechanicalkeyboard": 1, "mechanize": 1, "media": 2, "mega": 1, "megavieo": 1, "meme": 1, "memory": 4, "menubar": 1, "mercurial": 16, "merge": 2, "message": 2, "messaging": 1, "metrics": 1, "migration": 2, "mind": 1, "mindmapping": 1, "mining": 2, "minitoc": 1, "minsky": 1, "mir": 2, "mit": 1, "mk": 3, "mkl": 1, "mkv": 1, "mocha": 2, "mock": 1, "mod": 2, "model": 2, "modeling": 1, "monad": 2, "money": 3, "mongodb": 1, "monitor": 1, "monitoring": 1, "monome": 2, "moon": 1, "moore": 1, "morphing": 1, "moto": 2, "mount": 2, "mouse": 2, "movie": 1, "movies": 4, "mozilla": 4, "mp3": 9, "mpd": 1, "mssql": 1, "multiclass": 1, "multinomial": 1, "multiuser": 1, "music": 56, "musk": 1, "mx": 1, "myspace": 2, "mysql": 6, "n&b": 1, "naive": 3, "nanar": 1, "naturalDeduction": 1, "ncurses": 1, "neogeo": 4, "neovim": 2, "netcat": 1, "netfilter": 1, "network": 13, "networking": 3, "nexttick": 1, "nginx": 6, "ngrok": 1, "ninja": 1, "ninjatune": 1, "NJ": 1, "node": 8, "node.js": 10, "nodejs": 15, "nodes": 1, "noir": 1, "noise": 2, "noitunes": 1, "normalization": 1, "nostalgia": 1, "notes": 3, "notification": 4, "npm": 4, "nvim": 2, "nyc": 1, "obfuscation": 2, "object": 1, "oldschool": 1, "one": 1, "online": 12, "onTheFly": 2, "oo": 2, "opengl": 1, "openmp": 4, "openscad": 7, "opensource": 38, "openstreetmap": 1, "openwrt": 2, "opera": 1, "optimization": 9, "option": 4, "options": 2, "org": 1, "orgmode": 1, "oriented": 1, "orm": 3, "ortholinear": 4, "oss": 10, "osx": 1, "p2p": 1, "package": 3, "paid": 1, "painting": 1, "palette": 3, "pandoc": 1, "paper": 5, "parallel": 2, "paraplegic": 1, "paris": 3, "parser": 3, "parsing": 1, "partition": 1, "passeport": 2, "password": 1, "passwords": 1, "pasteBin": 3, "patch": 3, "pathfinding": 1, "pattern": 6, "patterns": 2, "pbt": 2, "pcb": 2, "pdf": 3, "pdflatex": 1, "pedal": 1, "peek": 1, "perceptual": 3, "perf": 1, "performance": 13, "perl": 12, "persistence": 1, "personal": 1, "pfe": 2, "pfu": 1, "pg": 1, "pgp": 1, "phaser": 1, "philosophy": 1, "phoenix": 2, "photo": 8, "photoshop": 11, "php": 3, "pihole": 1, "pimpl": 1, "pipe": 1, "pir": 2, "piracy": 1, "PKGBUILD": 3, "player": 1, "pleroma": 1, "plugin": 12, "plus": 1, "poem": 1, "poetry": 1, "pointer": 1, "poisson": 1, "poker": 1, "pollution": 1, "polymorphism": 1, "porn": 1, "portal": 1, "post": 2, "postbin": 1, "poste": 1, "postfix": 2, "postgres": 1, "postgresql": 2, "powerpoint": 2, "practice": 2, "pragma": 2, "preprocessor": 2, "prerendeing": 1, "presentation": 8, "presentations": 1, "printer": 2, "privacy": 4, "private": 1, "privatekey": 1, "production": 3, "productivity": 5, "profiling": 1, "programing": 15, "programming": 111, "projectstructure": 1, "promicro": 1, "promise": 2, "prompt": 3, "pronoun": 1, "property": 1, "protocol": 1, "proxy": 5, "psychology": 1, "pub": 1, "publish": 1, "puppeteer": 3, "push": 2, "putty": 1, "pv": 1, "pwd": 1, "pwnage": 1, "pysieved": 1, "python": 28, "qmk": 3, "qobuz": 1, "quadtree": 1, "questions": 1, "queue": 5, "quickref": 1, "quotes": 1, "r": 1, "rabbitmq": 3, "racial": 1, "racket": 1, "ractive": 1, "radio": 6, "rainbow": 1, "ramda": 1, "range": 1, "rant": 1, "rapidshare": 1, "raspberrypi": 2, "ratelimit": 1, "ratio": 1, "rc": 1, "react": 8, "reactive": 1, "reactjs": 2, "reader": 2, "readme": 1, "realforce": 1, "reative": 1, "recapctha": 1, "recipies": 1, "recommendation": 1, "recorder": 1, "recovery": 2, "recruiting": 1, "redux": 1, "reference": 41, "refresh": 2, "regexp": 8, "render": 1, "rendering": 1, "renouvellement": 2, "repl": 1, "reportage": 1, "repository": 2, "representation": 1, "research": 3, "reseau": 1, "resource": 6, "resources": 15, "rest": 1, "restart": 1, "restructuredtext": 1, "resume": 1, "retrieval": 1, "retro": 2, "reverse": 1, "review": 1, "reviews": 1, "riddle": 1, "rip": 1, "rnbl-mn": 1, "robot": 1, "rockbox": 1, "rocketleague": 3, "rollup": 1, "rom": 3, "roomba": 2, "rounding": 1, "router": 1, "rplugin": 1, "rsa": 1, "rsnapshot": 1, "rss": 2, "rst": 1, "rsync": 1, "ruby": 1, "rule": 1, "rust": 1, "safari": 1, "sample": 4, "sampler": 1, "sandbox": 1, "sass": 1, "satellite": 1, "save": 1, "scalability": 1, "scale": 1, "schedule": 1, "schema": 3, "schematics": 2, "scheme": 2, "science": 2, "scm": 2, "scraping": 6, "screen": 6, "screencapture": 2, "screencast": 3, "screencasting": 2, "script": 8, "scripting": 4, "scripts": 1, "scrobbling": 1, "sdcard": 3, "search": 17, "searchengine": 8, "secret": 1, "secure": 1, "security": 25, "sed": 3, "seeqpod": 2, "seh": 1, "semantic": 9, "semanticweb": 2, "send": 1, "sensitve": 1, "seo": 1, "serie": 3, "series": 1, "server": 12, "service": 2, "setTimeout": 2, "settimmediate": 1, "seven": 1, "sexp": 1, "sgbd": 1, "shapeways": 1, "share": 2, "sharing": 4, "shell": 10, "show": 2, "showcase": 1, "shows": 1, "sicp": 1, "sid": 2, "sierra": 1, "sieve": 1, "signatur": 1, "signature": 4, "similarity": 1, "sip": 1, "skip": 1, "sky": 1, "sleep": 2, "slides": 4, "slideshow": 1, "slk": 1, "slk2016": 2, "sloppy": 1, "sms": 1, "sms2mail": 1, "smtp": 3, "snippets": 1, "snort": 1, "social": 5, "socialClub": 1, "SocialMusicResearch": 1, "socket": 2, "socks": 1, "software": 11, "solder": 1, "soldering": 1, "sort": 2, "sorting": 2, "sound": 3, "sourcemap": 1, "southPark": 1, "space": 4, "spacex": 1, "spam": 4, "spamassassin": 1, "spatial": 1, "speedup": 1, "spider": 1, "split": 3, "spoof": 1, "spotify": 4, "spotlight": 2, "spreadsheet": 2, "sprite": 1, "sql": 2, "sqlserver": 1, "sqrt": 1, "srilanka": 1, "ssh": 14, "sshfs": 1, "ssl": 4, "standard": 3, "stapleberg": 1, "star": 1, "starterkit": 1, "startup": 1, "stash": 1, "statistics": 2, "statusline": 1, "stereotype": 1, "stip": 1, "stl": 8, "stock": 3, "storage": 2, "streaming": 11, "string": 4, "stroustrup": 1, "structure": 1, "style": 3, "styleguide": 1, "sublime": 1, "subtitles": 1, "subtring": 1, "subversion": 2, "suffix": 1, "suicide": 1, "supermicro": 1, "support": 1, "survey": 1, "svg": 18, "svm": 4, "svn": 7, "swf": 1, "swift": 3, "swig": 1, "switch": 4, "sxg": 7, "symbol": 1, "sync": 2, "syndication": 1, "synology": 2, "syntastic": 1, "sysadmin": 11, "syslog": 1, "t440p": 1, "table": 4, "tag": 2, "tagging": 2, "tags": 2, "talent": 1, "task": 2, "tax": 1, "tdd": 1, "tease": 1, "tech": 1, "technology": 3, "ted_nelson": 1, "telescope": 1, "template": 7, "tempo": 1, "temporary": 3, "terminal": 14, "terminfo": 1, "termite": 1, "terms": 1, "terms-of-service": 1, "termsofservice": 1, "terraform": 1, "test": 8, "testing": 10, "tex": 4, "text": 4, "textmate": 1, "textobject": 1, "textures": 1, "theme": 3, "themes": 1, "therory": 1, "thread": 1, "threading": 2, "threejs": 1, "tiling": 1, "time": 2, "timer": 2, "timezone": 1, "tips": 21, "tld": 2, "tmpfs": 1, "Tmux": 2, "toc": 1, "todo": 2, "token": 2, "tokindle": 2, "tool": 35, "toolbar": 1, "toolkit": 1, "tools": 23, "top": 1, "topre": 2, "torrent": 1, "tos": 1, "touch": 2, "touchbar": 1, "touchpad": 1, "tpope": 1, "trac": 1, "tracker": 2, "tracking": 1, "trackpad": 2, "trackpoint": 1, "traduction": 1, "train": 2, "training": 1, "transfer": 1, "transit": 1, "travel": 2, "traversal": 1, "tree": 2, "trevise": 1, "trick": 1, "tricks": 1, "trip-hop": 2, "troll": 1, "tshirt": 2, "tty": 2, "tui": 5, "tunnel": 6, "tunneling": 2, "tuto": 1, "tutor": 1, "tutorial": 92, "tv": 5, "txt": 1, "typescript": 13, "typesetting": 1, "typespeed": 1, "typing": 3, "ubuntu": 7, "udev": 1, "ui": 7, "ultra": 1, "uml": 1, "undo": 1, "unicode": 3, "unicorn": 1, "unittest": 2, "unitybuild": 1, "universe": 1, "unix": 39, "update": 1, "upload": 3, "urgence": 1, "url": 1, "usb": 4, "user": 1, "utf-8": 1, "utf8": 4, "utilities": 2, "utility": 1, "uuid": 1, "ux": 1, "vaccum": 1, "validator": 1, "vanilla": 1, "variable": 1, "vasilijs": 1, "vault": 1, "vc++": 1, "vcs": 4, "vector": 2, "velero": 1, "venise": 1, "versioning": 1, "verticalsearch": 1, "vhost": 1, "vi": 1, "video": 19, "videobb": 1, "viewer": 1, "vim": 48, "viml": 1, "vimperator": 4, "vimscript": 1, "violence": 1, "viral": 1, "visualization": 5, "visualStudio": 8, "vitalist": 1, "vmware": 2, "vp3": 1, "vpn": 1, "vs": 1, "vs2008": 2, "vsplit": 1, "vst": 7, "w3c": 1, "wallah": 1, "wallet": 2, "wallpaper": 3, "wallpapers": 2, "warez": 5, "wasd": 1, "wave": 1, "weakref": 1, "web": 41, "web2.0": 4, "webapp": 5, "webassembly": 1, "webauthn": 1, "webchat": 1, "webdesign": 15, "webdev": 8, "webfonts": 1, "webkit": 3, "webmail": 2, "webpack": 4, "webpackage": 5, "webscraping": 1, "webservices": 1, "website": 2, "websocket": 2, "webworker": 1, "webzine": 1, "well-known": 1, "wep": 1, "wget": 1, "whatwg": 1, "whitepaper": 1, "wicked": 1, "widget": 2, "wifi": 3, "wiki": 9, "wikibook": 1, "wikipedia": 2, "wildcard": 1, "win32": 2, "window": 3, "windows": 18, "wireguard": 2, "wireless": 4, "wm": 2, "wol": 1, "word": 2, "wordart": 1, "work": 4, "worker": 1, "workman": 1, "wow": 1, "wrapper": 1, "writing": 1, "wtnbl-mn": 1, "wxPerl": 2, "wxWidgets": 5, "x11": 1, "xanadu": 1, "xerak": 1, "xlwt": 1, "xmodmap": 1, "xmpp": 1, "Xresources": 1, "xterm": 1, "yahoo": 1, "yaourt": 1, "yarn": 1, "yubikey": 1, "zoom": 1, "zsh": 5 } ```
spamwax commented 4 years ago

@pyrho are you still getting the error? is issue resolved for rest of you after pinboard's fix?

tofagerl commented 4 years ago

I still get this when refreshing:

[13:14:51.042] Rusty Pin[Run Script] Passing output '{"items":[{"icon":{"path":"erroricon.icns"},"subtitle":"invalid type: map, expected a sequence at line 1 column 0","title":"Error"}]}

Since Maciej apparently fixed the bug, I tried deleting the workflow and reinstalling a newly downloaded version from Releases, but that led to the same state.

pyrho commented 4 years ago

@pyrho are you still getting the error?

Yes.

is issue resolved for rest of you after pinboard's fix?

No.

ps: thanks for the edit above :X

monfresh commented 4 years ago

I'm seeing the same error as @pyrho, even after deleting and installing again. It looks like the error is happening here: https://github.com/spamwax/rusty-pin/blob/1e3e64846abd26f0f19a151c367b2be408f4c45f/src/pinboard/api.rs#L195-L217

spamwax commented 4 years ago

serde expects a map and for some reason pinboard's API is not providing valid data. does this only happen when you have tag suggestion feature turned on?

Mercurius-Lee commented 4 years ago

does this only happen when you have tag suggestion feature turned on? When I turned off the tag suggestion feature, I pinned a page to my board, but I failed at the second time.

tofagerl commented 4 years ago

@spamwax Can you not replicate this? I have CLion and rust installed, so I can help you debug it if you need more info. What I don't have is a lot of rust experience...

monfresh commented 4 years ago

Another strange thing I noticed is that the workflow seems to make API calls to https://api.pinboard.in/v1/tags/get even when it's not needed. For example, I deleted the workflow, including deleting the files in Library/Application Support/Alfred/Workflow Data\cc.hamid.alfred-pinboard-rs and /Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/cc.hamid.alfred-pinboard-rs, and then reinstalled it. The first thing I did was pconf, and when I go to Click to check for Workflow updates, I get the same error invalid type: map, expected a sequence at line 1 column 0 because the workflow is calling that function in rusty-pin that parses the tags.

Why does the workflow need to fetch tags to check for workflow updates?

monfresh commented 4 years ago

What's even more strange is that the API call succeeded to get my tags, even though I did not set the API token yet. How did the workflow know which token to use? Is there another file the workflow uses that's not in Library/Application Support/Alfred or Library/Caches/com.runningwithcrayons.Alfred?

monfresh commented 4 years ago

Never mind the last comment about the token. I had the old Golang version of the workflow still in the Alfred Application Support, and that's where it found the token. After I deleted that and reinstalled, I confirmed that pconf doesn't work until you set the token.

monfresh commented 4 years ago

Using Ruby to inspect the contents of the body in the tags GET request, I noticed a \t at the end of the closing bracket. For example:

"{\"rust\":1,\"golang\":1}\t"

I don't think that \t is supposed to be there. Ruby is able to parse the JSON just fine, but perhaps what rusty-pin is doing is causing it to throw an error.

monfresh commented 4 years ago

I think I figured out the issue. The tags frequency test in rusty-pin is using a mock JSON response that uses strings for the tag frequency: https://github.com/spamwax/rusty-pin/blob/master/tests/all_tags_mockito.json. For example:

{
  "tag1": "1",
  "tag2": "1"
}

However, the Pinboard API response uses integers for the frequency. This is what is causing the error invalid type: map, expected a sequence at line 1 column 0. I verified this by cloning the rusty-pin repo and changing the mock response to use integers instead of strings. I wonder if this is something that changed in the Pinboard API. I will ask Maciej.

monfresh commented 4 years ago

Either way, I think rusty-pin should be more resilient and be able to work with either strings or integers. Thoughts, @spamwax?

tofagerl commented 4 years ago

Could be a change in serde, then? Even a bug...

tofagerl commented 4 years ago

I don't mean to be a pest, but this has broken my bookmarks flow, and I now have to use the pinboard website every time I have to go to a website I can't remember the address for. Is this bug/change easy to fix/work around? If not, I have to find another way to access pinboard.

pyrho commented 4 years ago

I've been using https://github.com/vitorgalvao/pinplus, it does the job.

vmlrodrigues commented 4 years ago

Sad that I've had to go back to PinPlus as I really did prefer Rusty Pin.

tofagerl commented 4 years ago

OK, I've replicated the issue by making all tag frequency numbers into numbers instead of strings. Trying to make a PR now.

Edit: PR

monfresh commented 4 years ago

Here are instructions that worked for me for those of you who want to be able to keep using this workflow right away:

  1. Install Rust
  2. Clone both this repo (https://github.com/spamwax/alfred-pinboard-rs) and the rusty-pin repo (https://github.com/spamwax/rusty-pin) locally. No need to fork.
  3. In the rusty-pin repo, make the same changes as in this PR: https://github.com/spamwax/rusty-pin/pull/6/files
  4. In the alfred-pinboard-rs repo, make the following changes to Cargo.toml: a. Update the version on line 3 to "0.15.13" b. Replace lines 24 and 25 (git and branch) with the path to your local rusty-pin repo:. For example, path = "/Users/monfresh/projects/rusty-pin"
  5. I commented out a bunch of stuff in create_alfred_workflow.sh so that it would only build the workflow locally. You can copy and paste what I did, but make sure to change line 13 to point to your local alfred-pinboard-rs repo
    
    #!/bin/bash

set -x

version_tag=$1 msg=$2 push_it=$3

if [ -z "$version_tag" ]; then echo "You need to provide a semver tag: v0.9.10" exit fi

alfred_pinboard_rs="/Users/moncef/projects/monfresh/alfred-pinboard-rs"

workflow_dir="$HOME/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.BE0BAA6E-408E-40A0-AEF2-922BFAA8BBF0"

res_dir="$alfred_pinboard_rs/res/workflow"

git checkout master || exit

Run clippy

if ! cargo +nightly clippy; then

exit

fi

echo "Building new release..." cd "$alfred_pinboard_rs" || exit

Bump Cargo.toml version

python res/fix_cargo_version.py "$version_tag"

cargo build --release > build.log 2>&1

echo "Copying resoursces from Alfred's workflow dir..."

cp "$workflow_dir"/* "$res_dir"

echo "Copying executable to workflow's folder..." strip target/release/alfred-pinboard-rs cp target/release/alfred-pinboard-rs "$res_dir"

echo "Updating version in info.plist"

version_tag=$(git describe --tags --abbrev=0)

defaults write "$res_dir"/info.plist version "$version_tag" plutil -convert xml1 "$res_dir"/info.plist

cp "$res_dir"/info.plist "$workflow_dir"

echo "Creating the workflow bundle..." rm -f AlfredPinboardRust.alfredworkflow cd "$res_dir" || exit rm -f AlfredPinboardRust.alfredworkflow

zip -r AlfredPinboardRust.alfredworkflow ./*

echo "Moving bundle to executable folder..."

mv AlfredPinboardRust.alfredworkflow "$alfred_pinboard_rs"

rm alfred-pinboard-rs

cd "$alfred_pinboard_rs" || exit

git add .circleci

git add res/workflow

git add res/images

git add Cargo.toml

git add Cargo.lock

git add CHANGELOG.md

git add README.md

git add create_alfred_workflow.sh

git add src

commit_msg="Release version $version_tag"

[ -n "$msg" ] && commit_msg="$commit_msg

$msg"

git pull origin master

git commit -a -m "$commit_msg"

git tag "$version_tag"

if [ -n "$push_it" ]; then

git push --tags

sleep 5

git push

fi


6. Run `cargo build`
7. Run `$(which bash) create_alfred_workflow.sh 0.15.13`
8. In your local `alfred-pinboard-rs` directory, go to `res/workflow`, then double-click on `AlfredPinboardRust.alfredworkflow`. That should install it in your Alfred, and everything should be working fine now.
vmlrodrigues commented 4 years ago

Thanks @monfresh, worked like a charm for me and I'm not getting the error in #83.

spamwax commented 4 years ago

Thank you all for your patience and contributions. API was changed without notice and update to its documentation. This issue will be fixed by the end of tomorrow when I get back to my cave.

spamwax commented 4 years ago

Later release is being built on CircleCI and should be finished soon. Please update the workflow by directly downloading from the release page here as the error in this issue may prevent the builtin auto-update. Please report back or open new issue if still experiencing problems.

spamwax commented 4 years ago

closing as it seems issue is fixed now.