After you render the web image, I’ve been using it this way:
pixlet push <deviceID> myApp MyAppInstallationID -b --api-token <apiKey>
After you render the web image, I’ve been using it this way:
pixlet push <deviceID> myApp MyAppInstallationID -b --api-token <apiKey>
On the public repo idea. 2 possible ways:
For approvals, you’d submit your app repo and tibdyt could decide whether or not to add it to the mobile app for push via the more traditional app channel.
When I try your way with -b it says that it is not supported
I tried several different ways to publish but it seems impossible
Is this the way it should look?
pixlet push --api-token “123456” “abcd” examples/bitcoin.webp “TestID”
Thanks in advance
This is what works for me:
pixlet push <deviceID> MyApp.webp <installationID> -b --api-token <apiToken>
So in your example, I would try (assuming abcd is your device ID):
pixlet push abcd examples/bitcoin.webp TestID -b -api-token 123456
If -b
is not supported, you may be running an old version of pixlet and should update.
That was the trick, it jumped many versions
Thanks
I really struggled with getting cron to work this docker example. I switched to yacron and it works great!
Sharing for those interested.
More on yacron:
gjcarneiro/yacron: A modern Cron replacement that is Docker-friendly (github.com)
My Dockerfile:
FROM golang:bullseye
ENV WEBP_VERSION libwebp-1.2.2-rc1
ENV REPO=$GOPATH/src/github.com/tidbyt/pixlet
RUN apt-get update \
&& apt-get install -y ca-certificates tzdata openssl libwebp-dev bash virtualenv
RUN git clone https://github.com/tidbyt/pixlet.git $REPO && cd $REPO && make build
RUN virtualenv -p /usr/bin/python3 /yacron && \
/yacron/bin/pip install yacron
COPY yacrontab.yaml /etc/yacron.d/yacrontab.yaml
COPY pixlet_app_file.star /lmflag.star
COPY do_pixlet.sh /do_pixlet.sh
ENTRYPOINT ["/yacron/bin/yacron"]
My yacrontab.xml file (which runs every 5 minutes from 6am to 10pm:
defaults:
environment:
- key: PYTHONIOENCODING
value: utf-8
jobs:
- name: do_pixlet
command: /do_pixlet.sh
schedule: "*/5 6-22 * * *"
captureStdout: false
do_pixlet.sh:
#!/bin/sh
/go/src/github.com/tidbyt/pixlet/pixlet render /pixlet_app_file.star > /proc/1/fd/1 2>/proc/1/fd/2 && /go/src/github.com/tidbyt/pixlet/pixlet push --api-token api_here --installation-id unique-app-name devicename /lmflag.webp -b > /proc/1/fd/1 2>/proc/1/fd/2
-Keith
Anyone have this working on crontab on mac?
Solved:
Here’s how I sorted this out with crontab:
Crontab (I had it run every minute just as a test)
` * * * * * “/users/path/to/script.sh”
.sh script
#!/bin/sh
/opt/homebrew/bin/pixlet render /path/to/file.star;
/opt/homebrew/bin/pixlet push --api-token <api-token> \
--installation-id <installation id> <key> /path/To/file.webp;
** I installed via homebrew so I had to include path.
Allow crontab full disk access:
Willing to share? This is awesome