This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # gem install active_support | |
| require 'active_support/inflector' | |
| require 'active_support/core_ext/string' | |
| # gem install webrick (only ruby3) | |
| require 'webrick' | |
| # gem install mechanize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%* | |
| //v1.6.2: Fix with update to Templater where wasn't removing the selected text/line "on move" | |
| //'first' will add to top of file. 'last' will add to bottom of file | |
| let firstOrLastLine = 'last'; | |
| //Choose a specific line to move to underneath; overrules firstOrLastLine if true | |
| const bChooseLine = false; | |
| //After moving the line, open the file it was moved to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```dataviewjs | |
| // find dates based on format [[YYYY-MM-DD]] | |
| const findDated = (task)=>{ | |
| if( !task.completed ) { | |
| task.link = " " + "[[" + task.path + "|*]]"; | |
| task.date=""; | |
| const found = task.text.match(/\[\[([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))\]\]/); | |
| if(found) task.date = moment(found[1]); | |
| return true; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Copyright (c) 2019 Valentin B. | |
| A simple music bot written in discord.py using youtube-dl. | |
| Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly. | |
| Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know. |
OlderNewer