ebtrfio-template
ebtrfio-template copied to clipboard
Template Repository for Frame in Order (Facebook). Written in Shell (for fun)
Every (name) Frame in Order BOT
An OpenSource BOT for Facebook Frame in Order
that runs without 24/7 hosting costs
Table of Contents
- Tutorial
- Setup FB Token
- Setup Frames
- Setup your BOT
- How to make your Content Public
- How to Run the Bot Manually
- How to Manually Disable the Posting
- Notes and Tips
- Contributing
- Status
Tutorial
This section tells how to make it work. In more detailed way.
[!NOTE] Grammatical Errors ahead, we're not native english speaker so please bear with us.
Setup Facebook Token
Click Here to Show
To set up a Facebook long-lived access token, follow these steps:
- Go to Facebook Developer
- Click
My Apps
- Click
Create App
- Click
BusinessandNext(Business has more perks, than others so pick it)
- This is very Self Explanatory, I guess you already know what to do.

- Hover through
toolsand ClickGraph Api Explorer
- Grant Permissions for token, Click
Add a Permission, Then clickEvents Groups Pagesclick all the following
[!NOTE] The scopes should be color
blackas the image shows, If it shows colorgreenit means it's not yet applied to the token. (Repeat the proccess if the next step doesn't work)
- Click on
User Tokenand choose the page you want.
- There's gonna popup there, just give the App Permissions and Authorize it.
- Now Click
Generate Access Tokenand set theUser Tokento the page you want, then copy the Short-Lived-Token
- Go back to
DashboardAgain. Then hover throughtoolsand clickAccess Token Debugger
- Insert the Token you copied earlier and Click
Extend Access Token

- Now Copy it and Save it Somewhere

Setup the Frames
Click Here to Show
You need to use Windows Powershell to use program called FFMPEG
We need to install Scoop First, before installing FFMPEG
To open Windows Powershell:
- Click
Windows Button - And Search for
Windows Powershellthen Right-Click and clickRun as Administrator
After you open it, Run this command:
iwr -useb get.scoop.sh | iex
[!TIP] If theres an error occured, just run the command below and re-run the command above. (Disregard the command below if theres no error appeared)
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Now Run this command, to install FFMPEG and GIT:
scoop install ffmpeg git
After succeeding, Now run these commands:
md "$($env:USERPROFILE)\Desktop\frames"
cd "$($env:USERPROFILE)\Desktop\frames"
This folder will appear on your Desktop, And thats where you will replace your video you want to chop

Now chop the video by running this command:
ffmpeg -i "video.mkv" -r 2 -q:v 3 frame_%00d.jpg
-i "video.mkv"input file-r 2is the frames chopped per second (needed inconfig.conf)-q:v 3qualityframe_%00d.jpgoutput file
Wait until it finished...
[!NOTE] This is getting this info is deprecated, no need for you to gather it.
Then, we're gonna gather the infos of Video and Make sure to Take note all the infos needed.
To get the total frames of the video. (You can see this info too while chopping the frames)
ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 video.mkvTo get the frame rate of the video (If you get fractions "24/1" omit "/1")
ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 video.mkv
Then now we're gonna upload the frames to GitHub.
Open your Windows Powershell and Run the Command below:
cd ..
git clone https://github.com/{your_username_here}/{repo_name}
[!IMPORTANT] Make sure that you already created a repository for this template.
{repo_name}stands for the name of your repo you created for this template
Now, Run this command:
cd {repo_name}
Copy-Item -Path "$($env:USERPROFILE)\Desktop\frames\frame_*.jpg" -Destination frames -Recurse
git init
git add .
git commit -m "frames, update"
Provide your Git Infos, Must be the same as your username and email (it will not display it on public):
git config --global user.name "<your-username>"
git config --global user.email <[email protected]>
Now get your GitHub token, refer to this tutorial...
- And finally, Push the changes to the repository:
git remote set-url origin https://{your_username}:{your_token_here}@github.com/{your_username}/{repo_name}
git push origin master
Setup your BOT
Click Here to Show
- Add subtitle file (only supported *.ass/*.ssa, *.srt subtitles)
- Insert all the infos needed in
config.conffile. https://github.com/fearocanity/ebtrfio-template/blob/039f6e9cf9f89356b7b8bd60b074f36a6ef9d8d4/config.conf#L4-L8
- And push it to master.
We need to setup our repo secret variables too...
-
To setup it, first go to
Settingson your GitHub Repo.
-
Under the
Secrets and Variablessection, ClickActions
-
Then click
New Repository Secret
-
The name must be
TOK_FB, And Paste your Long-Live Facebook you save earlier, Then clickAdd Secret.
- (Optional) You can add the GIF token too by creating again, and it is named
TOK_GIF
- (Optional) You can add the GIF token too by creating again, and it is named
-
Go to
Settingsagain, UnderActions, clickGeneral
-
Click
Read and Write Permissionandsaveit.
-
Then you're good to go for a test now. You're Done!!
How to make your Content Public
[!IMPORTANT] All the contents you post will not be shown to public if it not set to
Live
Click Here to Show
-
Go to
Settings>Basic -
And Change your
Privacy Policy URLtohttps://google.com, Then clickSave Changesat the bottom of the page. -
Then go back to the
Dashboardand Switch your Transparency from Development to Live
How to Run the Bot Manually
Click Here to Show
- Click on
Actions
- Click on
init banner, And clickRun Workflow
[!CAUTION] We prefer not doing this (The BOT is already running), because it will cause to run the workflow twice when the automatic run was executed. it'll cause duplication. Instead do Manually Disable Workflow. Make sure you know what you're doing. (This is helpful if you want to run the posting after you enable the workflow)
How to Manually Enable/Disable the Posting
Click Here to Show
- Click on
Actions
- Click on
init banner, and click the three dots···. Then finally, click onDisable Workflow
[!TIP] Enabling it pretty much the same procedure, It will appear the enable button at the top.
How to Change the Interval execution of Posting
Click Here to Show
-
Firstly, go to
.github/workflows/process.yml -
And change the cron syntax
0 */2 * * *, this cron syntax stands forevery 2 hrs, so you can just change the2based on your likings. Or you can make your own cron here.
[!CAUTION] Make sure you know what you're doing, This might cause duplications and errors on posting. And before you adjust it, make sure the product of
fphandminsmustn't exceed to the number of hours you set on cron. Assume you havefph=50andmins=5, so the product of it is:50 * 5 = 250, then divide it with 60 to know the number of hours:250 / 60 = 4.16 hrs
Notes and Tips
[!TIP]
- By Default, the bot will automatically run every 2 hrs. (This is our Standard Interval posting)
- We recommend to use
Use this Templatebutton rather than forking this repository.- We recommend Creating a Pull Request when you're setupping frames for next episode/series to track your changes and guides you on what steps you will take.
- Make sure not to push something in master while the BOT is running. Wait it to be finished first to avoid duplicatiom issues.
- Keep your repository updated with parent repository for fixes and security measure updates.
- When proceeding to a new Episode, you should create a Pull Request to your repo. (Don't forget
frameiteratorto change back to1)- Use
action/repo-checkeras your basis for checking errors and misconfiguration.- Recommended source:
Erai-Raws,Nyaa.- If you need help, just message us on our
Facebook page. Or create an Issue/Discussion thread here.
- When using a VPS/Droplet server, just clone this repository and paste all your frames to
framesdirectory, also the tokens are gonna be insecret.shfile.
[!WARNING] We're not responsible whatever happens to your Facebook account. Just to be safe, I prefer using an dedicated account for the page, else you can use your main but use it with care. Use at your own risk
Contributing
+ All PR's are now welcome!! +
If you have ideas or fixes to the bugs and also improving the codes, Feel free to Contribute! 😉
Status
