This repository was archived by the owner on Jun 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtweets.html
More file actions
46 lines (46 loc) · 1.45 KB
/
tweets.html
File metadata and controls
46 lines (46 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<base target="_top" />
</head>
<body>
<? var data = LibMailchimpHTML.getData('All Tools!A:P'); ?>
<? if (Array.isArray(data) && data.length) { ?>
<p>
Click the links below to create a draft tweet. Remember to schedule
it for the next few days.
<a
href="https://twitter.com/compose/tweet/unsent/scheduled"
target="_blank"
>
See existing Scheduled Tweets</a
>.
</p>
<ul>
<? for (var row in data) { ?>
<? var text = "Interesting tool of the week: " + data[row]['URL'];
if (data[row]['Twitter']) {
text += " by " + data[row]['Twitter'].trim();
}
text += "\n\nWe like: " + data[row]['What we like'].trim();
if (data[row]['Sponsored']) {
text += "\n\n✦ Sponsored";
}
?>
<li>
<a
href="https://twitter.com/intent/tweet?text=<?= text; ?>"
target="_blank"
>Tweet
<?= row; ?>
-
<?= data[row]['Tool/Product/Project'].trim(); ?></a
>
</li>
<? } ?>
</ul>
<? } else { ?>
<p>No items scheduled.</p>
<? } ?>
</body>
</html>