This file contains 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
import requests | |
consumer_key = "YOUR_CONSUMER_KEY" | |
access_token = "YOUR_ACCESS_TOKEN" | |
path = "oneTabUrls.txt" | |
with open(path) as file: | |
lines = file.readlines() | |
urls = [line.split(' | ')[0] for line in lines] | |
filteredUrls = filter(lambda url: url != '\n', urls) |
This file contains 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
import webbrowser | |
import requests | |
class PocketItem: | |
sort_id = 0 | |
resolved_url = "" | |
item_id = "" | |
def __init__(self, sort_id, resolved_url, item_id): | |
self.sort_id = sort_id |
This file contains 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
const iCloud = FileManager.iCloud(); | |
const vaultPath = iCloud.bookmarkedPath('hatopedia'); | |
const dailyNoteName = `${formatDate(new Date())}.md`; | |
const dailyNotePath = `${vaultPath}/Daily Notes/${dailyNoteName}`; | |
console.log(`Target:${dailyNoteName}`); | |
if (!iCloud.fileExists(dailyNotePath)) { |
This file contains 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
const iCloud = FileManager.iCloud(); | |
const vaultPath = iCloud.bookmarkedPath('hatopedia'); | |
const dailyNoteDirectory = `${vaultPath}/Daily Notes/`; | |
const numbersToKeep = 3; | |
const files = iCloud.listContents(dailyNoteDirectory); | |
const dailyNotes = files.filter(function(value) { | |
return value.startsWith('20') && value.endsWith('.md'); | |
}); |
This file contains 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
const todoText = "#### Todo"; | |
const todoPrefix = "- [ ]"; | |
const todoIcon = "◻"; | |
const fontSize = 15 | |
const iCloud = FileManager.iCloud(); | |
// **TODO** Add the Vault folder to the File Bookmark in Scriptable settings. | |
const vaultPath = iCloud.bookmarkedPath('[YOUR_BOOKMARK_NAME]'); |
This file contains 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
imageView.contentMode = UIViewContentModeScaleAspectFit; |
This file contains 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
UIImage *hogeImage = [UIImage imageNamed:@"hoge.png"]; | |
UIImageView *hogeView = [[UIImageView alloc] initWithImage:hogeImage]; | |
hogeView.userInteractionEnabled = YES; | |
[hogeView addGestureRecognizer:swipeDownGesture]; |
This file contains 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
@interface HogeViewController : UIViewController{ | |
NSString *documentDirectory; | |
NSArray *files; | |
} |
This file contains 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
NSArray *documentDirectries = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentDirectory = [documentDirectries lastObject]; | |
NSLog(@"%@",documentDirectory); |