0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AWS Summit Tokyoにエントリー完了した?Googleカレンダーに一括で登録しよう

Last updated at Posted at 2023-03-28

AWS Summit Tokyoがもうすぐ開催されますね!今回も盛りだくさんのセッションが用意されていて楽しみですね。とりあえず色々なセッションに登録はしたものの、それぞれをGoogleカレンダーに登録するのって結構面倒じゃないですか?

そんなあなたのために、今回は一括でGoogleカレンダーに登録できるブックマークレットを作りました。これで、カレンダー登録もラクラク、AWS Summit Tokyoを余すことなく楽しめる(はず)です

まずAWS Summit Tokyoのマイページを開きます

以下のページからログインして、マイページにアクセスしましょう。
https://jpsummit.awsevents.com/public/mypage/top/plain
image.png

次のブックマークレットを叩きます(URLから、コンソールから実行どちらでも可)


javascript:(function() {
    function createGoogleCalendarLink(startDate, endDate, title) {
      const startTime = startDate.toISOString().replace(/-|:|\.\d+/g, '');
      const endTime = endDate.toISOString().replace(/-|:|\.\d+/g, '');
  
      const encodedTitle = encodeURIComponent(title);
  
      return `https://www.google.com/calendar/render?action=TEMPLATE&dates=${startTime}%2F${endTime}&text=${encodedTitle}`;
    }
  
    const listItems = document.querySelectorAll('.ss_mypage_application_document li');
    const regex = /(\d+)月(\d+)日\(.{1}\)\s+(\d+):(\d+)-(\d+):(\d+)((\d+)分)(?:<br>)*(.*?)(?:<br>*)/is;
    const currentYear = new Date().getFullYear();
  
    listItems.forEach((listItem) => {
      const content = listItem.innerHTML;
      const match = regex.exec(content);
  
      if (match) {
        const [_, month, day, startHour, startMinute, endHour, endMinute, duration, title] = match;
        const startDate = new Date(currentYear, month - 1, day, startHour, startMinute);
        const endDate = new Date(currentYear, month - 1, day, endHour, endMinute);
      
        const link = createGoogleCalendarLink(startDate, endDate, title);
  
        const anchor = document.createElement('a');
        anchor.href = link;
        console.log(link);
        anchor.target = '_blank';
        anchor.textContent = link;
  
        listItem.appendChild(anchor);
      } else {
          console.log(content, match);
      }
    });
  })();
  

各予定部にGoogleカレンダーに登録できるリンクが発行される

それぞれぽちぽち登録してあげてください
image.png

リンククリックしたらGoogleカレンダーの新規イベント生成画面(入力後)が表示されます
image.png

これで、AWS Summit Tokyoの予定をGoogleカレンダーに登録することができました

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?